package core

type Storage interface {
	Put(*Block) error
}

type BlockStore struct {
	blocks []*Block
}

func (b BlockStore) Put(block *Block) error {
	if b.blocks == nil {
		b.blocks = make([]*Block, 0)
	}

	b.blocks = append(b.blocks, block)
	return nil
}

func NewBlockStore() *BlockStore {
	return &BlockStore{
		blocks: make([]*Block, 0),
	}
}
